# include<iostream>
# include<math.h>
using namespace std;

const int MAXN=105;
double x[MAXN], y[MAXN], v[MAXN], xx, yy, w;
int main(){
    int n;
    scanf("%d", &n);
    for(int i=0;i<=n;i++){
        scanf("%lf %lf", &x[i],  &y[i]);
    }
    scanf("%lf", &xx);
    w = 1; 
    v[0]=y[0];
    yy = y[0];
    for(int k=1;k<=n;k++){
        v[k] = y[k];
        for(int i=0;i<k;i++){
            v[k]=(v[i]-v[k])/(x[i]-x[k]);
        }
        w = w*(xx-x[k-1]);
        yy = yy + w * v[k];
    }
    printf("yy: %.19lf\n", yy);
    return 0;
}